import request from '@/utils/request'

// 查询课程信息列表
export function listCourseSubscribe(query) {
  return request({
    url: '/subscribe/courseSubscribe/list',
    method: 'get',
    params: query
  })
}

// 查询课程信息详细
export function getCourseSubscribe(id) {
  return request({
    url: '/subscribe/courseSubscribe/' + id,
    method: 'get'
  })
}

// 新增课程信息
export function addCourseSubscribe(data) {
  return request({
    url: '/subscribe/courseSubscribe/add',
    method: 'post',
    data: data
  })
}

// 修改课程信息
export function updateCourseSubscribe(data) {
  return request({
    url: '/subscribe/courseSubscribe/updateCourse',
    method: 'put',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 修改课程状态
export function updateCourseStatus(id) {
  return request({
    url: '/subscribe/courseSubscribe/updateCourseState',
    method: 'put',
    params: {
      id
    }
  })
}


// 删除课程信息
export function delCourseSubscribe(id) {
  return request({
    url: '/subscribe/courseSubscribe/' + id,
    method: 'delete'
  })
}

// 获取场馆最大人数
export function getVenueMaxNumber() {
  return request({
    url: '/venueManagement/management/getVenueMaxNumber',
    method: 'get'
  })
}

//获取教练信息
export function getCouchInfo() {
  return request({
    url: '/subscribe/courseSubscribe/getCouchInfo',
    method: 'get'
  })
}
